#!/usr/bin/env python2

import sys
import datetime

def main():
	fout = open("include/builddate.h", "w+")
	print >> fout, "#ifndef BUILDDATE_H"
	print >> fout, "#define BUILDDATE_H"
	print >> fout, "char const * const build_date=\"%s\";" % datetime.datetime.now().strftime("%Y-%m-%d %H:%M")
	print >> fout, "#endif"
	fout.close()
	return 0

if __name__ == "__main__":
	sys.exit(main())
